<?php
$checkbox = $_POST['checkbox'];
$checkboxid = implode(',',$checkbox);
$dsn = "mysql:host=127.0.0.1;dbname=blog";
$db = new PDO($dsn,"root","123456");
//设计字符集
$db->exec("set names utf8mb4");

$sql = "DELETE FROM category WHERE category_id in ($checkboxid);";
$result = $db->exec($sql);
if($result){
    echo "删除成功";
    echo "<a href='article.php'>点击返回列表页面</a>";
    exit();
}else{
    echo "删除失败，错误信息".$db->errorInfo()[2]."请联系管理员";
    echo "<a href='article.php'>点击返回分类增加页面</a>";
}